Repository navigation
fix(runner): report a response time value that does not fit a duration - #2655
Merged
Mzack9999 merged 1 commit intoOct 10, 2026
Merged
Conversation
FilterOperator.Parse reads a bare number as seconds by retrying time.ParseDuration with an "s" appended, and that retry discarded its error. A number too large to hold as a duration left value at zero with nothing reported, so -mrt '>=10000000000' became a filter matching every host rather than a rejected flag. The function had no tests. The new ones cover each operator, the bare-number path, trimming, and the inputs that have to be rejected. Only the overflow case changes: the other fifteen pass before and after.
CalvinTjoaquinn
force-pushed
the
fix/filter-operator-overflow
branch
from
September 29, 2026 06:24
39e2416 to
9ec2c1d
Compare
Mzack9999
approved these changes
Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2663
Proposed changes
FilterOperator.Parsereads a bare number as seconds by retryingtime.ParseDurationwith ansappended, and that retry discarded its error:A number that parses fine on its own but overflows once seconds are added takes the first branch, so
valuestays at zero and nothing is reported:>= 0sis true for every response, so the flag silently matches every host instead of being rejected. The flags affected are-mrt, -match-response-timeand-frt, -filter-response-time.Larger values happen to be caught already, because they fail the first parse with "invalid duration" rather than "missing unit" and fall through to the error branch:
So the gap is the range where the bare number is a valid float but the duration overflows, which starts a little above 9223372036 seconds.
Proof
Parsehad no tests, so the new file covers the whole contract: each of the six operators, the bare-number path, space trimming, and the inputs that have to be rejected.Against the current code only the overflow case fails:
The other fifteen subtests pass before and after, so the change is limited to the value that used to be swallowed.
go test ./runner/passes,go vetis clean, andgofmtreports nothing.Checklist
Summary by CodeRabbit